<template>
  <div class="topBar">
  <img src="../assets/logo1.png" alt="" class="top-bar-img">
    <el-menu  :default-active="this.$route.path" class="el-menu-demo" mode="horizontal" text-color="#000" active-text-color="#8DC783"
      router>
      
      <el-menu-item index="/categary">首页</el-menu-item>

      <el-menu-item index="/plan">项目规划</el-menu-item>
      <el-menu-item index="/goal">使命愿景</el-menu-item>
      <el-menu-item index="/culture">清柠文化</el-menu-item>
     </el-menu>
       <button class="el-button" @click="login">登录</button>
  </div>
</template>

<script>
export default {
  name: '',
  props: {},
  components: {},
  data () {
    return {
    };
  },
  methods: {
    login () {
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>
  .topBar{
    position: fixed;
    z-index: 9;
    top: 0;
    width: 100%;
    height: 85px;
    background-color: #fff;
    box-shadow: 0 0 15px #ddd;
    .top-bar-img{
      position: absolute;
      width: 15vw;
      top: -6vh;
      height: 28vh;
      z-index: 9;
      left: 7vw;

    }
    ul{
      position: absolute;
      left: 45%;
      transform: translate(-50%, 0);
      height: 85px;
      li{
        height: 75px;
        font-size: 18px;
        line-height: 85px;
        border: 0 ;
      }
      .div{
        font-size: 18px;
      }

    }
    button{
      position: absolute;
      top: 17px;
      right: 20vw;
      box-shadow: 0 0 10px #ddd;
      transform: translate(-50%, 0);
      width: 120px;
      height: 50px;
      border-radius: 25px;
      border: 0;
      cursor: pointer;
      background-color: #8DC783;
      font-size: 20px;
      &:hover{
        color: #eee;
      }

    }
    button:hover{
          opacity: 0.8;
          background-color:#60CE7A;
          transition: all 0.5s;
        }
  }
  .el-menu::after, .el-menu::before {
    color: #fbcf5f;
    position: absolute;
    display: inline-block;
    top: 50px;
}
  .el-menu.el-menu--horizontal {
    border-bottom: 0;
  }
  .el-submenu /deep/ .el-submenu__title {
    font-size: 18px;
    color: #303133;
    padding: 0 20px;
    cursor: pointer;
    transition: border-color .3s,background-color .3s,color .3s;
    box-sizing: border-box;
  }

  .el-menu-item{
    font-size: 18px;
  }
//   .el-menu--horizontal>.el-submenu /deep/ .el-submenu__title {
//     height: 85px;
//     line-height: 85px;
//     border-bottom: 2px solid transparent;
//     color: #909399;
// }
</style>
